package library.user;

import library.operation.*;

import java.util.Scanner;

public class NormalUser extends User{
    public NormalUser(String name){
        super(name);

        operation = new IOperation[]{
                new ExitOperation(),
                new ListOperation(),
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }

    //选项菜单
    @Override
    public int menu(){
        System.out.println("*************************");
        System.out.println("[" + name + "]"  + "用户欢迎你使用图书管理系统!");
        System.out.println("1.查看图书列表");
        System.out.println("2.按图书名查找图书");
        System.out.println("3.借阅图书");
        System.out.println("4.归还图书");
        System.out.println("0.退出图书系统");
        System.out.println("*************************");
        System.out.print("请输入你要操作的序号：");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();     //操作选项
        return choice;
    }
}
